package com.ating.demo.Mapper;

import com.ating.demo.Entity.Employee;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    List<Employee> selectAll(Employee employee);

    Employee selectById(Integer id);

    void insert(Employee employee);

    void updateById(Employee employee);

    @Select("select * from employee where username = #{username}")
    Employee selectByUsername(String username);

    @Delete("delete from employee where id = #{id}")
    void moveById(Integer id);
}
